<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <title>显示时、分、秒</title>
</head>
<body>
<script>
    function doThisLater() {
        alert('Time\'s up');
    }
    var timerId = setTimeout(doThisLater, 3000);
    clearTimeout(timerId);
</script>
</body>
</html>